package com.example.circular.bean2;

/**
 * ClassName:Wife
 * Package:com.example.circular.bean
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/9-14:11
 * @Version:v1.0
 */
//妻子类
public class Wife {

    private String name;
    private Husband husband;

    public Wife(String name, Husband husband) {
        this.name = name;
        this.husband = husband;
    }

    public String getName() {
        return name;
    }

    @Override
    public String toString() {
        return "Wife{" +
               "name='" + name + '\'' +
               ", husband=" + husband.getName() +
               '}';
    }
}
